﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MockupDesigner.Items;

namespace MockupDesigner.Editors
{
    public class ImageEditor : ItemEditor
    {


        public override void SetItem(ItemBase itemToEdit)
        {
            base.SetItem(itemToEdit);
            OpenFileDialog openFile = new OpenFileDialog();
            openFile.Multiselect = false;
            openFile.Filter = "JPEG (*.jpg)|*.jpg|PNG (*.png)|*.png|BMP (*.bmp)|*.bmp";
            if (openFile.ShowDialog() == DialogResult.OK)
            {
                (itemToEdit as ImageItem).Source = openFile.FileName;
            }
        }
        

    }
}
